package com.xywy.bloodandroid.act;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xywy.bloodandroid.R;
import com.xywy.bloodandroid.base.BaseActivity;

/**
 * 消息
 */
public class MessageActivity extends BaseActivity {

	private LinearLayout ll_free_ask; // 免费问医生
	private LinearLayout ll_system_messgae; // 系统消息

	private TextView middle_title;
	private RelativeLayout left_img;
	private ImageView right_img;

	@Override
	protected void initView(Bundle savedInstanceState) {

		setContentView(R.layout.act_message);
		ll_free_ask = (LinearLayout) findViewById(R.id.ll_free_ask);
		ll_system_messgae = (LinearLayout) findViewById(R.id.ll_system_messgae);

		middle_title = (TextView) findViewById(R.id.middle_title);
		middle_title.setText("消息盒子");
		left_img = (RelativeLayout) findViewById(R.id.left_img);
		right_img = (ImageView) findViewById(R.id.right_img);
		right_img.setVisibility(View.VISIBLE);

	}

	@Override
	protected void initListener() {
		ll_free_ask.setOnClickListener(this);
		ll_system_messgae.setOnClickListener(this);
		left_img.setOnClickListener(this);
		right_img.setOnClickListener(this);
	}

	@Override
	protected void initData() {

	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		super.onClick(v);
		switch (v.getId()) {
		case R.id.ll_free_ask:
			enterActivity(FreeAskDoctorActivity.class);

			break;
		case R.id.ll_system_messgae:
			enterActivity(SystemMessageActivity.class);
			break;

		case R.id.left_img:
			MessageActivity.this.finish();
			break;
		case R.id.right_img:
			enterActivity(MessageSettingActivity.class);
			break;
		}
	}

}
